package com.lmqb.constant;

import java.util.ResourceBundle;

public class Redis {
	
	public static String IP = getProperties("ip");
	
	public static String PORT = getProperties("port");
	
	public static String maxActive = getProperties("maxActive");
	
	public static String maxIdle = getProperties("maxIdle");
	
	public static String maxWait = getProperties("maxWait");
	
	public static String testOnBorrow = getProperties("testOnBorrow");
	
	public static String testOnReturn = getProperties("testOnReturn");
	
	public static String timeout = getProperties("timeout");
	
	public static String retrynum = getProperties("retrynum");
	
	public static String password = getProperties("password");
	
	public static final String getProperties(String key){
		try{
			ResourceBundle bundle = ResourceBundle.getBundle("redis");
			return bundle.getString(key);
		}catch(Exception e){
			e.printStackTrace();
			return "";
		}
	}
}
